import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/home',
  },
  {
    path: '/home',
    name: 'Home',
    component: () => import('@/views/home/Home')
  },
  {
    path: '/cart',
    name: 'Cart',
    component: () => import('@/views/cart/Cart')
  },
  {
    path: '/category',
    name: 'Category',
    component: () => import('@/views/category/Category')
  },
  {
    path: '/topic',
    name: 'Topic',
    component: () => import('@/views/topic/Topic')
  },
  {
    path: '/my',
    name: 'My',
    component: () => import('@/views/my/My')
  },
  {
    path: '/map',
    name: 'Map',
    component: () => import('@/views/map/Map')
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('@/views/search/Search')
  },
  {
    path: '/pages/category/category',
    name: 'PageCategory',
    component: () => import('@/views/pages/category/Category')
  },
  {
    path: '/pages/goods/goods',
    name: 'Goods',
    component: () => import('@/views/pages/goods/Goods')
  },
  {
    path: '/pages/newshot/goods',
    name: 'Newhot',
    component: () => import('@/views/pages/new-hot-goods/New-hot-goods')
  },
  {
    path: '/pages/brand/detail',
    name: 'BrandDetail',
    component: () => import('@/views/pages/brand-detail/Brand-detail')
  },
  {
    path: '/pages/brand/list',
    name: 'BrandList',
    component: () => import('@/views/pages/brand-list/Brand-list')
  },
  {
    path: '/pages/topic/detail',
    name: 'TopicDetail',
    component: () => import('@/views/pages/topic-detail/Topic-detail')
  },
  {
    path: '/pages/feedback',
    name: 'FeedBack',
    component: () => import('@/views/pages/feed-back/Feed-back')
  },
  {
    path: '/pages/addressList',
    name: 'AddressList',
    component: () => import('@/views/pages/address/Address-list')
  },
  {
    path: '/pages/addAddress',
    name: 'AddAddress',
    component: () => import('@/views/pages/address/Add-address')
  },
  {
    path: '/pages/order',
    name: 'Order',
    component: () => import('@/views/pages/order/Order')
  },
  {
    path: '/pages/collect',
    name: 'Collect',
    component: () => import('@/views/pages/collect/Collect')
  }
]

const router = new VueRouter({
  routes
})

export default router